from wsgiref.simple_server import make_server

from wsgi import WSGIHandler

app = WSGIHandler()


@app.route('/', method='GET')
def demo_view_func(request, response):
    return b'hello world'


if __name__ == '__main__':
    server = make_server('localhost', 8000, app)
    print("服务器开启，监听端口 :8000 ...")
    server.serve_forever()
